package com.lm56.common.validation.anotation.constraints;

import com.lm56.common.validation.anotation.validator.IndenticalValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.TYPE;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Created by Kelvin Yeung on 2016/10/30.
 */

@Target({TYPE, ANNOTATION_TYPE})
@Retention(RUNTIME)
@Constraint(validatedBy = IndenticalValidator.class)
public @interface Identical {
    String message() default  "{constraint.not.identical}";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    String field();
    String verifyField();

}
